﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Icst.Leaflike.Web;
using Icst.Leaflike.Data;


namespace Icst.Leaflike.Web.search
{
    public partial class skin : pagesearch
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            AddSelection(skinsSelector, Tree.SHUPI);
            AddListbox(skinColors, Tree.SHUGANYANSE);
        }
        protected override string OnSave(bool empty)
        {
            SearchQuery[SearchOption.Shupi] = empty ? string.Empty : skinsSelector.Selected;
            SearchQuery[SearchOption.Shuganyanse] = empty ? string.Empty : skinColors.SelectedValue;
            return "search_search.htm";
        }

        protected override void OnLoad()
        {
            skinsSelector[SearchQuery[SearchOption.Shupi]] = true;
            if (!string.IsNullOrEmpty(SearchQuery[SearchOption.Shuganyanse]))
                skinColors.SelectedValue = SearchQuery[SearchOption.Shuganyanse];
        }
    }
}
